package com.waghost.bridalgown.exception;

import com.waghost.bridalgown.entity.Result;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestController;

@RestController
@ControllerAdvice
@CrossOrigin
public class GlobExceptionController {

    @ExceptionHandler(value = UserException.class)
    public Result userExceptionHandler(UserException e) {
        return Result.noLogin();
    }

}
